package com.itheima.annotationtest;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class Testtest {
    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException {
        Class clazz = Class.forName("com.itheima.annotationtest.Test");
        Method[] methods = clazz.getDeclaredMethods();
        for (Method method : methods) {
            boolean present = method.isAnnotationPresent(annoTest.class);
            if (present){
                method.invoke(clazz.newInstance());
            }
        }
    }
}
